home *** CD-ROM | disk | FTP | other *** search
- #!/bin/perl
-
- # Send the output mime type to the server to know what output to handle
- print "Content-type: text/html\n\n";
-
- print <<EOH;
- <HTML>
- <HEAD><TITLE>CGI Script How-To: Test Script</TITLE></HEAD>
- <BODY>
- EOH
-
- # Call the subroutine
- &PrintEnv;
-
- print "</BODY></HTML>\n";
- exit;
-
- #
- # Define PrintEnv subroutine to print out all environment variables
- #
- sub PrintEnv
- {
- local($name);
- foreach $name (sort keys(%ENV))
- {
- print "<B>$name</B> = $ENV{$name}<BR>\n";
- }
- }
-
- #
- # end of printenv.pl
- #
-